package com.haois.component.service;

import com.haois.component.util.sdk.CosJdk;
import com.haois.component.util.sdk.JDKFactory;
import com.qcloud.cos.model.PutObjectResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.File;

/**
 * description
 *
 * @author RuiHaoZ on GCU
 * @date 2017/3/17 9:18
 */
public class TenCloudService {

    private Logger logger = LoggerFactory.getLogger(TenCloudService.class);

    public PutObjectResult upload(File cosFile, String filePath) {
        CosJdk cosJdk = JDKFactory.createCos();
        return cosJdk.upload(cosFile, filePath);
    }

    /**
     * @return 腾讯云地址前缀
     */
    public static String getCOSPreFixUrl() {
        String COSUrl = "https://h-0-1256186138.cos.ap-guangzhou.myqcloud.com";
        return COSUrl;
    }


}


